package yicheng.dinnertogetherapp;

import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;

public class LoginBackPressEditText extends EditText {

	public LoginBackPressEditText(Context context, AttributeSet attrs){
		super(context, attrs);
	}

	@Override
	public boolean onKeyPreIme (int keyCode, KeyEvent event){
		if (keyCode == KeyEvent.KEYCODE_BACK && 
				event.getAction() == KeyEvent.ACTION_UP) {

			LogInActivity.phone_number_input_text.setCursorVisible(false);
			LogInActivity.newpassword_input_text.setCursorVisible(false);
			LogInActivity.newpassword_second_input_text.setCursorVisible(false);
			LogInActivity.nickname_input_text.setCursorVisible(false);
			LogInActivity.username_input_text.setCursorVisible(false);
			LogInActivity.password_input_text.setCursorVisible(false);
			
			
			  		
			return false;
		}
		return super.dispatchKeyEvent(event);
	}

}
